
import { createApp } from 'vue'
import createRouter from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import 'dayjs/locale/zh-cn' //中文
import locale from 'element-plus/lib/locale/lang/zh-cn' //中文


// 导入插件
import request from './api/request'
import App from './App.vue'
// import 'lib-flexible/flexible.js'
import axios from 'axios'
import mixin from "./mixin"
import config from "./config"
import sha1 from "js-sha1";
import { api, lp, getRandom } from "./configs.js";
import "./rem.js";
const app = createApp(App)

const router = createRouter()
app.config.globalProperties.jm=()=>{

	let rannumbers = getRandom() + "";
	let timestamps = new Date().getTime() + "";
	let signs = sha1(rannumbers+timestamps+lp);
	return {rannumbers,timestamps,signs}
}
app.config.globalProperties.$http = request;
app.config.globalProperties.api = config.api
app.use(ElementPlus,{ locale })
app.use(router)
app.mount('#app')
app.mixin(mixin)
app.directive('imgheader', {
  mounted(el) {
    console.log(el)
  }
})
export default{
	app,
	router,
}